import axios from "axios";
import { BASE_URL } from './ApiCons'

export const addCommend = (data:any) => {
    return axios.post(
        BASE_URL + '/bookMsg/add',
        data
    )
}
export const getByBookId = (bookId:string) => {
    return axios.get(
        BASE_URL + `/bookMsg/getByBookId?bookId=${bookId}`
    )
}
export const getAllByUserName = (userName:string) => {
    return axios.get(
        BASE_URL + `/bookMsg/getAllByUserName?userName=${userName}`
    )
}
export const getById = (id:string) => {
    return axios.get(
        BASE_URL + `/bookMsg/getById?id=${id}`
    )
}
export const updata = (data:any) => {
    return axios.post(
        BASE_URL + `/bookMsg/updata`,
        data
    )
}
export const del = (id:string) => {
    return axios.delete(
        BASE_URL + `/bookMsg/del/${id}`
    )
}
